﻿<div class="form-group">
    <div class="checkbox">
        <label>
            <input type="checkbox" ng-checked="fieldInfo.IsRequired" ng-click="fieldInfo.IsRequired=!fieldInfo.IsRequired" />
            必填？
        </label>
    </div>
</div>
<div class="form-group">
    <label class="control-label">输入框长度</label>
    <div>
        <div class="btn-group">
            <a class="btn btn-default btn-sm" ng-class="{disabled:fieldInfo.Size==1}" ng-click="fieldInfo.Size=1">窄</a>
            <a class="btn btn-default btn-sm" ng-class="{disabled:fieldInfo.Size==2}" ng-click="fieldInfo.Size=2">中等</a>
            <a class="btn btn-default btn-sm" ng-class="{disabled:fieldInfo.Size==3}" ng-click="fieldInfo.Size=3">宽</a>
            <a class="btn btn-default btn-sm" ng-class="{disabled:fieldInfo.Size==4}" ng-click="fieldInfo.Size=4">占满</a>
        </div>
    </div>
</div>
<div class="form-group">
	<label class="control-label">
		选项
	</label>
	<div class="control-group">
		<div style="margin-bottom:10px;" ng-class="{default:option.DefaultSelected}" ng-repeat="option in fieldInfo.FieldOptions | orderBy:'Order'">
			<div>
                <div class="input-group">                    
                    <input type="text" class="form-control" placeholder="输入选项内容" ng-model="option.DisplayText">                    
                    <span class="input-group-addon dropdown">
                        <i class="glyphicon glyphicon-remove" ng-click="removeOption(fieldInfo.FieldOptions,option)" data-toggle="dropdown">
                        </i>
                    </span>
                </div>			
			</div>
			<div ng-show="fieldInfo.ShowValue">
				<input type="text" ng-model="option.Value" />
				<span class="add-on">
					<i class="icon-bullhorn dropdown-toggle" data-toggle="dropdown"></i>
					<code class="dropdown-menu alert alert-info">
						
					</code>
				</span>
			</div>
		</div>
	</div>
</div>
<input type="button" class="btn btn-default btn-xs" value="添加选项" ng-click="addOption(fieldInfo.FieldOptions)" />